home *** CD-ROM | disk | FTP | other *** search
/ Aminet 43 / Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso / Aminet / text / edit / BareED.lha / BareED / rexx / CharSet.rx next >
Text File  |  2000-02-05  |  982b  |  38 lines

  1. /* Demo, display all 256 characters of a font */
  2.  
  3. BAREED_HOST = GetClip('BAREED')
  4.  
  5. IF BAREED_HOST = '' THEN DO
  6.     CALL SetClip('BAREED')    /* Remove from ClipNode */
  7.     EXIT 5
  8.     END
  9.  
  10. ADDRESS VALUE BAREED_HOST
  11.  
  12. CALL SetClip('BAREED')        /* Remove from ClipNode */
  13.  
  14. /* ------------------- MAIN ---------------- */
  15.  
  16. set echo off
  17. new "T:temp"
  18. i = 0;
  19.  
  20. tell "WARNING: Now inserting characters that"'0a'x"may not be displayable and may force"'0a'x"other editors than BareED and perhaps"'0a'x"compilers too, to react incorrect!"
  21.  
  22. activate window
  23.  
  24. put chars '0a'x"Going to display all 256 characters of the specified font. Please note:"'0a'x"The zero (#0), the tab (#9) and the line feed (#10) are replaced through"'0a'x"space characters!"'0a'x'0a'x"Displaying 16 characters per line:"'0a'x'0a'x'0a'x
  25. move cursor pageend
  26.  
  27. do while i < 256
  28.     if i ~=  10 & i ~= 9 then
  29.         put char d2c(i)
  30.             else
  31.         put char ' '    /* Instead of linefeed */
  32.  
  33.     i = i + 1
  34.     j = i
  35.     if  j % 16 * 16 == i then
  36.         put char '0a'x
  37. end
  38.